ceph: Propagate dentry down to inode_change_ok()
authorJan Kara <jack@suse.cz>
Thu, 26 May 2016 14:10:38 +0000 (16:10 +0200)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 4 Jan 2017 19:39:36 +0000 (19:39 +0000)
commitce2b740b930d9342ab51d8e2f5b09d9650432e12
tree0aa8b37ba1073ccc48ff40708d0c7f6e89aa441e
parent0c8054202e0a57e4a6d53ae51d7a3bd618f518a6
ceph: Propagate dentry down to inode_change_ok()

To avoid clearing of capabilities or security related extended
attributes too early, inode_change_ok() will need to take dentry instead
of inode. ceph_setattr() has the dentry easily available but
__ceph_setattr() is also called from ceph_set_acl() where dentry is not
easily available. Luckily that call path does not need inode_change_ok()
to be called anyway. So reorganize functions a bit so that
inode_change_ok() is called only from paths where dentry is available.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Gbp-Pq: Topic bugfix/all
Gbp-Pq: Name ceph-Propagate-dentry-down-to-inode_change_ok.patch
fs/ceph/acl.c
fs/ceph/inode.c